/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.app.entity;

import com.thinkgem.jeesite.modules.menu.entity.OrderGoods3;
import com.thinkgem.jeesite.modules.shop.entity.OrderGoods;
import com.thinkgem.jeesite.modules.sys.entity.User;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

import java.util.List;

/**
 * 订单Entity
 * @author dby
 * @version 2020-07-14
 */
public class Order2 extends DataEntity<Order2> {
	
	private static final long serialVersionUID = 1L;
	private User user;		// 用户id
	private String orderStatus;		// 订单状态0下单1已接单,确认订单2已完成 3取消订单
	private String shippingStatus;		// 配送状态0未发货 1已发货 2已收货 3已退货
	private String payStatus;		// 支付状态0未支付 1已支付 2已退款
	private String consignee;		// 收货人姓名
	private String address;		// 收货地址
	private String phone;		// 收货人电话
	private String moneyPaid;		// 付款总额
	private String orderAmount;		// 订单总额
	private String payTime;		// 支付时间
	private String shippingTime;		// 配送时间
	private String status;		// 启用状态 0=不可用 1=可用
	private String sort;		// 排序
	//辅助字段属性
	private List<OrderGoods2> orderGoodsList;


	public Order2() {
		super();
	}

	public Order2(String id){
		super(id);
	}

	@NotNull(message="用户id不能为空")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=1, max=1, message="订单状态0下单1已接单,确认订单2已完成 3取消订单长度必须介于 1 和 1 之间")
	public String getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}
	
	@Length(min=1, max=1, message="配送状态0未发货 1已发货 2已收货 3已退货长度必须介于 1 和 1 之间")
	public String getShippingStatus() {
		return shippingStatus;
	}

	public void setShippingStatus(String shippingStatus) {
		this.shippingStatus = shippingStatus;
	}
	
	@Length(min=1, max=1, message="支付状态0未支付 1已支付 2已退款长度必须介于 1 和 1 之间")
	public String getPayStatus() {
		return payStatus;
	}

	public void setPayStatus(String payStatus) {
		this.payStatus = payStatus;
	}
	
	@Length(min=1, max=20, message="收货人姓名长度必须介于 1 和 20 之间")
	public String getConsignee() {
		return consignee;
	}

	public void setConsignee(String consignee) {
		this.consignee = consignee;
	}
	
	@Length(min=1, max=100, message="收货地址长度必须介于 1 和 100 之间")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=1, max=15, message="收货人电话长度必须介于 1 和 15 之间")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public String getMoneyPaid() {
		return moneyPaid;
	}

	public void setMoneyPaid(String moneyPaid) {
		this.moneyPaid = moneyPaid;
	}
	
	public String getOrderAmount() {
		return orderAmount;
	}

	public void setOrderAmount(String orderAmount) {
		this.orderAmount = orderAmount;
	}
	
	@Length(min=1, max=10, message="支付时间长度必须介于 1 和 10 之间")
	public String getPayTime() {
		return payTime;
	}

	public void setPayTime(String payTime) {
		this.payTime = payTime;
	}
	
	@Length(min=1, max=10, message="配送时间长度必须介于 1 和 10 之间")
	public String getShippingTime() {
		return shippingTime;
	}

	public void setShippingTime(String shippingTime) {
		this.shippingTime = shippingTime;
	}
	
	@Length(min=0, max=1, message="启用状态 0=不可用 1=可用长度必须介于 0 和 1 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@Length(min=0, max=4, message="排序长度必须介于 0 和 4 之间")
	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public List<OrderGoods2> getOrderGoodsList() {
		return orderGoodsList;
	}

	public void setOrderGoodsList(List<OrderGoods2> orderGoodsList) {
		this.orderGoodsList = orderGoodsList;
	}



}